package Algorithm;

public class RoundWord {
    public static boolean isRoundWord(String s1,String s2){
        if(s1.length()!=s2.length()){  //旋转词的长度要相同
            return false;
        }
        StringBuilder stringBuilder=new StringBuilder(s1);
        stringBuilder.append(s1);
        return stringBuilder.toString().contains(s2);
    }
    public static void main(String[] args) {
        System.out.println(isRoundWord("ABCD","BCDA"));
    }
}
